const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('as4KdotsUpdateInfo', {
    id: {
      autoIncrement: true,
      type: DataTypes.INTEGER,
      allowNull: false,
      primaryKey: true,
      comment: "编号"
    },
    create_time: {
      type: DataTypes.DATE,
      allowNull: true,
      defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
      comment: "创建时间"
    },
    update_time: {
      type: DataTypes.DATE,
      allowNull: true,
      defaultValue: "2020-03-23 00:00:00",
      comment: "更新时间"
    },
    share_code: {
      type: DataTypes.STRING(6),
      allowNull: true,
      comment: "数字代码"
    },
    share_name: {
      type: DataTypes.STRING(500),
      allowNull: true,
      comment: "名称"
    },
    done_tc: {
      type: DataTypes.TINYINT,
      allowNull: true,
      comment: "题材"
    },
    done_tc_count: {
      type: DataTypes.TINYINT,
      allowNull: true,
      comment: "题材"
    },
    done_holder_before10: {
      type: DataTypes.TINYINT,
      allowNull: true,
      comment: "十大股东"
    },
    done_holder_before10_free: {
      type: DataTypes.TINYINT,
      allowNull: true,
      comment: "流通股东"
    },
    done_event: {
      type: DataTypes.TINYINT,
      allowNull: true,
      comment: "重大事件"
    },
    done_price: {
      type: DataTypes.TINYINT,
      allowNull: true,
      comment: "股价"
    }
  }, {
    sequelize,
    tableName: 'as4kdots_update_info',
    timestamps: false,
    indexes: [
      {
        name: "PRIMARY",
        unique: true,
        using: "BTREE",
        fields: [
          { name: "id" },
        ]
      },
    ]
  });
};
